package cn.lefull.producer.controller;

import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: qijiang
 * @Date: 2018/10/16 16:55
 * @Description:
 */
@RestController
public class TestController {
    @RequestMapping("/hello")
    public String index(@RequestParam String name) {
        return "hello "+name+"，this is  first messge";
    }

    @PostMapping("/transferMessage")
    public int transferMessage(@RequestParam String jsonObject) {
        System.out.println(jsonObject);
        return 1;
    }
}
